home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Eagles Nest BBS 5
/
Eagles_Nest_Mac_Collection_Disc_5.TOAST
/
Math & Engineering
/
SPSS4Cmd
/
SPSS.help.rsrc
/
HELP_64_Help
< prev
next >
Wrap
Text File
|
1990-03-15
|
6KB
|
150 lines
COMPUTE target variable=expression
Arithmetic Operators:
+ Addition - Subtraction
* Multiplication / Division
** Exponentiation
Arithmetic Functions:
ABS(arg) Absolute value
RND(arg) Round
TRUNC(arg) Truncate
MOD(arg) Modulus
SQRT(arg) Square root
EXP(arg) Exponential
LG10(arg) Base 10 logarithm
LN(arg) Natural logarithm
ARSIN(arg) Arcsine
ARTAN(arg) Arctangent
SIN(arg) Sine
COS(arg) Cosine
Statistical Functions:
SUM[.n](arg list) Sum of values across list
MEAN[.n](arg list) Mean value across list
SD[.n](arg list) Standard deviation of values
across list
VAR[.n](arg list) Variance of values across
list
CFVAR[.n](arg list) Coefficient of variation of
values across list
MIN[.n](arg list) Minimum value across list
MAX[.n](arg list) Maximum value across list
Missing Value Functions:
VALUE(varname) Ignore user-missing
MISSING(varname) True if missing
SYSMIS(varname) True if system-missing
NMISS(arg list) Count number missing values
across list
NVALID(arg list) Number of valid values
across list
Cross-case Function:
LAG(varname,n) Return value of variable
n cases before
Logical Functions:
RANGE(varname,range) True if value of variable
is in range
ANY(arg,arg list) True if value of first
arg matches arg list
Other Functions:
UNIFORM(arg) Uniform pseudo random no.
between 0 and n
NORMAL(arg) Normal pseudo random no.
with mean 0 and std dev n
CDFNORM(arg) Return probability random
variable falls below n
PROBIT(arg) Inverse of CDFNORM
The values of "arg" can be numeric values,
variables, or expressions.
Date and time aggregation functions:
DATE.DMY(d,m,y) Read day, month, year and
return date
DATE.MDY(m,d,y) Read month, day, year and
return date
DATE.YRDAY(y,d) Read year, day, number and
return date
DATE.QYR(q,y) Read quarter, year and
return quarter start date
DATE.MOYR(m,y) Read month, year and return
month start date
DATE.WKYR(w,y) Read week, year and return
week start date
TIME.HMS(h,m,s) Read hour, minutes, seconds
and return time interval
TIME.DAYS(d) Read days and return time
interval
Date and time conversion functions:
YRMODA(yr,mo,da) Convert year, month, day
to day number
CTIME.DAYS(arg) Convert time interval to days
CTIME.HOURS(arg) Convert time interval to
hours
CTIME.MINUTES(arg) Convert time interval to
minutes
Date and time extraction functions:
XDATE.MDAY(arg) Return the day of the month
XDATE.MONTH(arg) Return the month of the year
XDATE.YEAR(arg) Return the four digit year
XDATE.HOUR(arg) Return the hour of a day
XDATE.MINUTE(arg) Return the minute of an hour
XDATE.SECOND(arg) Return the second of a minute
XDATE.WKDAY(arg) Return the weekday number
XDATE.JDAY(arg) Return the day number of a
day in a given year
XDATE.QUARTER(arg) Return the quarter of a date
in a given year
XDATE.WEEK(arg) Return the week number of a
date in a given year
XDATE.TDAY(arg) Return the number of days in
a time interval
XDATE.TIME(arg) Return the time portion of a
given date and time
XDATE.DATE(arg) Return integral portion of
date
String Functions:
Function Definition
ANY(arg,arg list) Return 1 if value of arg
matches value in arg list
CONCAT(arg list) Join the arguments into a
string
INDEX(a1,a2,a3) Return number indicating
position of first
occurence of a2 in a1
LAG(arg,n) Return value of arg n cases
before
LENGTH(arg) Return length of arg
LOWER(arg list) Convert upper case letters
to lower case
LPAD(a1,a2,a3) Left pad beginning of a1 to
length a2 with character a3
LTRIM(a1,a2) Trim character a2 from
beginning of a1
MAX(arg list) Return max. value of arg list
MIN(arg list) Return min. value of arg list
NUMBER(arg,format) Convert argument into number
using format
RANGE(arg,arg list) Return 1 if value of arg is
in inclusive range
of arg list
RINDEX(a1,a2,a3) Return number indicating
rightmost occurence of a2
in a1
RPAD(a1,a2,a3) Right pad end of a1 to length
a2 with character a3
RTRIM(a1,a2) Trim character a2 from end
of a1
STRING(arg,format) Convert argument into string
using format
SUBSTR(a1,a2,a3) Return substring of a1
beginning with position a2
for length a3
UPCASE(arg list) Convert lower case letters to
upper case